1. Field of the Invention
The present invention relates to an image recognition apparatus for recognizing an object from an image and a teaching apparatus of the image recognition apparatus.
2. Description of the Prior Art
An art has been known so far which recognizes an object by applying image processing to an image photographed by a camera and extracting a characteristic value. This image recognition art is applied to various image recognition apparatuses including an inspection apparatus for an industrial product and a visual-sense apparatus of a robot.
To specify an object through image recognition, it is necessary to previously teach a computer about the characteristic of the object. This operation is referred to as teaching. Teaching is described below by using an inspection apparatus as an example. First, a non-defective product and a defective product are prepared. Then, characteristic values for the non-defective product and characteristic values (scratch and chip) for defective portions of the defective product are extracted from images (teacher image) obtained by imaging them to decide a determination reference value (teaching data) for determining the quality of an object to be inspected in accordance with these characteristic values.
Japanese Patent Laid-Open No. (Hei) 8-21803, now Japanese Patent No. 3,140,177 and Japanese Patent Laid-Open No. 2001-168160 are known as the prior art for the above field. Japanese Patent Laid-Open No. (Hei) 8-21803 proposes an apparatus for determining the type of a defect detected through a defect inspection by making a neuro processing unit learn various defect information. U.S. Pat. No. 3,140,177 proposes an apparatus capable of correcting an inspection reference value of an object included in the middle between a non-defective product and a defective product. Japanese Patent Laid-Open No. 2001-168160 proposes an apparatus for determining the type of a defect of an object in accordance with a defect detection parameter and defect characteristic value data.
An object to be recognized generally includes a fluctuation due to an individual difference and a fluctuation frequently occurs in an image due to the fluctuation of an imaging environment such as illumination or environmental light. In the case of a defective product, there are infinite types of defects and there is no pattern to a position where a defect appears or the shape or size of the defect. Therefore, to perform teaching, it is necessary to prepare the maximum number of teacher images of non-defective and defective products (e.g. several tens to several hundreds).
FIG. 9 shows an illustration conceptually showing conventional image teaching. In FIG. 9, a point plotted by a circle denotes a characteristic value of a non-defective product and a point plotted by a cross denotes a characteristic value of a defective product. By collecting many characteristic values of non-defective and defective products, the difference between trends of fluctuation of non-defective products and the difference between trends of fluctuation of defective products are confirmed to set a determination reference value between them (continuous line in FIG. 9).
However, because it is impossible to exhaustively prepare teacher images, it is difficult to confirm a correct boundary between a range of fluctuation of non-defective products and a range of fluctuation of defective products only by teaching using an image. Therefore, as shown in FIG. 9, a determination reference value (continuous line) hardly coincides with a correct boundary (broken line). In this case, a product to be originally determined as a non-defective product (white triangle in FIG. 9) is determined as a defective product or a product (black triangle in FIG. 9) to be originally determined as a defective product is determined as a non-defective product and thereby, an inspection error occurs.
Therefore, it has been necessary to drive in teaching data by repeating teaching many times or manually adjusting teaching data so that a non-defective product and a defective product are correctly determined (that is, so as to be intended by a user). However, the above operation must be performed by a skilled person having advanced skill and know-how by using lots of labor and time. Therefore, improvement is requested.